import 'package:flutter/material.dart';

class TextWidget extends StatefulWidget {

  const TextWidget({required this.mKey}) : super(key: mKey);

  final Key mKey;

  @override
  State createState() => TextWidgetState();

}

class TextWidgetState extends State<TextWidget> {

  String text = "0";

  void onPressed(int count) {
     setState(() {
       text = '$count';
     });
  }

  @override
  Widget build(BuildContext context) {
     return Text(text,style: const TextStyle(color: Colors.cyan,fontSize: 18),);
  }

}